import request from "@/utils/request";
// 获取所有频道的接口
export const getAllChannels = () => {
 return  request({
    type: "get",
    url: "/v1_0/channels",
  });
};



// 设置用户的频道（部分覆盖）
 export const addUserChannel=channels=>{
   return request({
     method:'PATCH',
     url:'/v1_0/user/channels',
     data:{
       channels:[channels]
     }
   })
 }
// 删除用户指定频道持久化操作
export const deleteUserChannel=channelId=>{
  return request({
    method:'DELETE',
    url:`/v1_0/user/channels/${channelId}`
  })
}